<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition>
		<p:ajaxExceptionHandler type="javax.ejb.EJBException"
			update="exceptionDialog" onexception="PF('exceptionDialog').show();" />

		<p:dialog id="exceptionDialog"
			header="Exception '#{pfExceptionHandler.type}' occured!"
			widgetVar="exceptionDialog" height="500px">
        Message: #{pfExceptionHandler.message} <br />
        StackTrace: <h:outputText
				value="#{pfExceptionHandler.formattedStackTrace}" escape="false" />
			<br />

			<p:button onclick="document.location.href = document.location.href;"
				value="Reload!"
				rendered="#{pfExceptionHandler.type == 'javax.faces.application.ViewExpiredException'}" />
		</p:dialog>
	</ui:composition>
</body>
</html>